import { getCacheSync, setCache } from '@/utils/cacheHelper'

/**
 * 是否已使用过AI智洗
 */
function getLearningUsedCacheKey(haId: string) {
  return haId + '-LEARNING_USED'
}

export function getLearningUsedCache(haId: string) {
  const cacheKey = getLearningUsedCacheKey(haId)
  return getCacheSync<boolean>(cacheKey) || false
}
export function setLearningUsedCache(haId: string, used: boolean) {
  const cacheKey = getLearningUsedCacheKey(haId)
  return setCache(cacheKey, used)
}
